package com.ilancuo.numric;

/**
 * JVM 会对区间 [-128, 127] 内的值使用相同的引用
 *
 * Created by ilancuo on 2018/4/8.
 */
public class IntegerTest {

    public static void main(String[] args) {
        Integer i1 = 100;
        Integer i2 = 100;
        System.out.println(i1 == i2); //true

        Integer i3 = 200;
        Integer i4 = 200;
        System.out.println(i3 == i4); //false
    }
}
